package com.atguigu.study.spring.ciculardepend;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author: 叶子
 * @date: 2022/03/02 13:56
 * spring容器演示三级缓存解决循环依赖
 **/
public class ClientSpringContainer {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        A a = context.getBean("a",A.class);
        B b = context.getBean("b",B.class);
//      如果把bean的scope设置为prototype，则会报BeanCurrentlyInCreationException
    }
}